package com.ruoyi.constant;

/**
 * @Author 史家浩
 * @Description
 * @Param
 * @return
 **/

public enum CityRegionEnum {

    SJZ("130100", "石家庄"),
    TS("130200", "唐山市"),
    QHD("130300", "秦皇岛市"),
    HD("130400", "邯郸市"),
    XT("130500", "邢台市"),
    BD("130600", "保定市"),
    ZJK("130700", "张家口市"),
    CD("130800", "承德市"),
    CZ("130900", "沧州市"),
    LF("131000", "廊坊市"),
    HS("131100", "衡水市");



    private String code;
    private String desc;

    CityRegionEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    /**
     * 校验option是否存在
     * @param option
     * @return
     */
    public static boolean validateOption(String option) {
        for (CityRegionEnum value : CityRegionEnum.values()) {
            if (value.getCode().equals(option)) {
               return true;
            }
        }
        return false;
    }
}
